const memory = require('feathers-memory');
module.exports = function(app) {
  if(typeof app.channel !== 'function') {
    // If no real-time functionality has been configured just return
    return;
  }

  app.on('connection', connection => {
    app.channel('everybody').join(connection)
    
  });

  // Publish all events to the `everybody` channel
  app.publish(() => app.channel('everybody'));

  // Initialize the messages service
  app.use('quoteWS', memory({
    paginate: {
      default: 10,
      max: 25
    }
  }));
  app.service('quoteWS')
  .on('created', message =>{
    debugger
  });
};
